package com.mini.game;


import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.view.View.*;
import android.view.*;

public class BoxDraw extends View implements OnTouchListener {

	
		
		public GameBox red;
		public GameBox blue;
		public GameBox white;
		
		public BoxDraw(Context context){
			super(context);
			red = new GameBox(context, 6 ,5);
			blue= new GameBox(context ,5, 5);
			white = new GameBox(context ,5 ,5);
			
			setFocusableInTouchMode(true);
			this.setOnTouchListener(this);
			
		}
		
			
			public void onDraw(Canvas canvas){
				canvas.drawColor(0x000000);
				red.onMove(10,10,red);
				blue.onMove(10, 10, blue);
				white.onMove(10, 10, white);
				paint = new Paint();
				paint.setColor(Color.RED);
				paint.setAntiAlias(true);
				canvas.drawCircle(red.getboxx(), red.getboxy(), 55, paint);
				paint.setColor(Color.BLUE);
				canvas.drawCircle(blue.getboxx(), blue.getboxy(), 35, paint);
				paint.setColor(Color.WHITE);
				canvas.drawCircle(white.getboxx(), white.getboxy(), 15, paint);
				invalidate();
		
		
		
	
	
	

}

		public boolean onTouch(View v, MotionEvent event) {
			// TODO Auto-generated method stub
			return false;
		}}
